<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">

body { font-family: courier; font-size: 12; }

.code  { font-size: 9; color: #444444; display: none; margin-left: 20px; }
.py_c_api  { color: red; }
.py_macro_api  { color: #FF7000; }
.pyx_c_api  { color: #FF3000; }
.pyx_macro_api  { color: #FF7000; }
.refnanny  { color: #FFA000; }

.error_goto  { color: #FFA000; }

.tag  {  }

.coerce  { color: #008000; border: 1px dotted #008000 }

.py_attr { color: #FF0000; font-weight: bold; }
.c_attr  { color: #0000FF; }

.py_call { color: #FF0000; font-weight: bold; }
.c_call  { color: #0000FF; }

.line { margin: 0em }

</style>
<script>
function toggleDiv(id) {
    theDiv = document.getElementById(id);
    if (theDiv.style.display == 'none') theDiv.style.display = 'block';
    else theDiv.style.display = 'none';
}
</script>
</head>
        <body>
<p>Generated by Cython 0.12 on Fri Jan 15 19:54:05 2010
<p>Raw output: <a href="mandel2i_cy.c">mandel2i_cy.c</a>
<pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line1")'> 1: # mandel2g_cy.pyx</pre>
<pre id='line1' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line2")'> 2: # cython: profile=True</pre>
<pre id='line2' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line3")'> 3: </pre>
<pre id='line3' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line4")'> 4: import cython</pre>
<pre id='line4' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line5")'> 5: </pre>
<pre id='line5' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line6")'> 6: @cython.profile(False)</pre>
<pre id='line6' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFe7' onclick='toggleDiv("line7")'> 7: cdef inline bint mandel(double real, double imag, int max_iterations=20):</pre>
<pre id='line7' class='code' style='background-color: #FFFFe7'>
static INLINE int __pyx_f_11mandel2i_cy_mandel(double __pyx_v_real, double __pyx_v_imag, struct __pyx_opt_args_11mandel2i_cy_mandel *__pyx_optional_args) {
  int __pyx_v_max_iterations = ((int)20);
  double __pyx_v_z_real;
  double __pyx_v_z_imag;
  int __pyx_v_i;
  double __pyx_v_zr_sq;
  double __pyx_v_zi_sq;
  double __pyx_v_z_cross;
  int __pyx_r;
  <span class='pyx_c_api'><span class='refnanny'>__Pyx_RefNannySetupContext</span></span>("mandel");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_max_iterations = __pyx_optional_args->max_iterations;
    }
  }
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line8")'> 8:     '''determines if a point is in the Mandelbrot set based on deciding if,</pre>
<pre id='line8' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line9")'> 9:        after a maximum allowed number of iterations, the absolute value of</pre>
<pre id='line9' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line10")'> 10:        the resulting number is greater or equal to 2.'''</pre>
<pre id='line10' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line11")'> 11:     cdef double z_real = 0., z_imag = 0.</pre>
<pre id='line11' class='code' style='background-color: #FFFFff'>
    __pyx_v_z_real = 0.0;
  __pyx_v_z_imag = 0.0;
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line12")'> 12:     cdef int i</pre>
<pre id='line12' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line13")'> 13:     cdef double zr_sq, zi_sq, z_cross</pre>
<pre id='line13' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line14")'> 14: </pre>
<pre id='line14' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line15")'> 15:     for i in range(0, max_iterations):</pre>
<pre id='line15' class='code' style='background-color: #FFFFff'>
    __pyx_t_1 = __pyx_v_max_iterations;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line16")'> 16:         zr_sq = z_real*z_real</pre>
<pre id='line16' class='code' style='background-color: #FFFFff'>
        __pyx_v_zr_sq = (__pyx_v_z_real * __pyx_v_z_real);
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line17")'> 17:         zi_sq = z_imag*z_imag</pre>
<pre id='line17' class='code' style='background-color: #FFFFff'>
        __pyx_v_zi_sq = (__pyx_v_z_imag * __pyx_v_z_imag);
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line18")'> 18:         z_cross = 2*z_real*z_imag</pre>
<pre id='line18' class='code' style='background-color: #FFFFff'>
        __pyx_v_z_cross = ((2 * __pyx_v_z_real) * __pyx_v_z_imag);
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line19")'> 19: </pre>
<pre id='line19' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line20")'> 20:         z_real = zr_sq - zi_sq + real</pre>
<pre id='line20' class='code' style='background-color: #FFFFff'>
        __pyx_v_z_real = ((__pyx_v_zr_sq - __pyx_v_zi_sq) + __pyx_v_real);
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line21")'> 21:         z_imag = z_cross + imag</pre>
<pre id='line21' class='code' style='background-color: #FFFFff'>
        __pyx_v_z_imag = (__pyx_v_z_cross + __pyx_v_imag);
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line22")'> 22:         if (zr_sq + zi_sq) &gt;= 4:</pre>
<pre id='line22' class='code' style='background-color: #FFFFff'>
        __pyx_t_3 = ((__pyx_v_zr_sq + __pyx_v_zi_sq) >= 4);
    if (__pyx_t_3) {
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line23")'> 23:             return False</pre>
<pre id='line23' class='code' style='background-color: #FFFFff'>
            __pyx_r = 0;
      goto __pyx_L0;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }
</pre><pre class='line' style='background-color: #FFFFe7' onclick='toggleDiv("line24")'> 24:     return (zr_sq + zi_sq) &lt; 4</pre>
<pre id='line24' class='code' style='background-color: #FFFFe7'>
    __pyx_r = ((__pyx_v_zr_sq + __pyx_v_zi_sq) < 4);
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  <span class='pyx_c_api'><span class='refnanny'>__Pyx_RefNannyFinishContext</span></span>();
  return __pyx_r;
}
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line25")'> 25: </pre>
<pre id='line25' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFF0c' onclick='toggleDiv("line26")'> 26: def create_fractal(int canvas_width, int canvas_height,</pre>
<pre id='line26' class='code' style='background-color: #FFFF0c'>
static PyObject *__pyx_pf_11mandel2i_cy_create_fractal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_11mandel2i_cy_create_fractal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_canvas_width;
  int __pyx_v_canvas_height;
  double __pyx_v_min_x;
  double __pyx_v_min_y;
  double __pyx_v_pixel_size;
  int __pyx_v_nb_iterations;
  PyObject *__pyx_v_canvas = 0;
  int __pyx_v_x;
  int __pyx_v_y;
  int __pyx_v_start_y;
  int __pyx_v_end_y;
  double __pyx_v_real;
  double __pyx_v_imag;
  int __pyx_v_start_line;
  PyObject *__pyx_r = NULL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__canvas_width,&__pyx_n_s__canvas_height,&__pyx_n_s__min_x,&__pyx_n_s__min_y,&__pyx_n_s__pixel_size,&__pyx_n_s__nb_iterations,&__pyx_n_s__canvas,0};
  <span class='pyx_c_api'><span class='refnanny'>__Pyx_RefNannySetupContext</span></span>("create_fractal");
  <span class='pyx_c_api'>__Pyx_TraceCall</span>("create_fractal", __pyx_f[0], 26);
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    Py_ssize_t kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds);
    PyObject* values[7] = {0,0,0,0,0,0,0};
    switch (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)) {
      case  7: values[6] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 6);
      case  6: values[5] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 5);
      case  5: values[4] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 4);
      case  4: values[3] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3);
      case  3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2);
      case  2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1);
      case  1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)) {
      case  0:
      values[0] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s__canvas_width);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
      case  1:
      values[1] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s__canvas_height);
      if (likely(values[1])) kw_args--;
      else {
        <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("create_fractal", 1, 7, 7, 1);<span class='error_goto'> {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
      }
      case  2:
      values[2] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s__min_x);
      if (likely(values[2])) kw_args--;
      else {
        <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("create_fractal", 1, 7, 7, 2);<span class='error_goto'> {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
      }
      case  3:
      values[3] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s__min_y);
      if (likely(values[3])) kw_args--;
      else {
        <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("create_fractal", 1, 7, 7, 3);<span class='error_goto'> {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
      }
      case  4:
      values[4] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s__pixel_size);
      if (likely(values[4])) kw_args--;
      else {
        <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("create_fractal", 1, 7, 7, 4);<span class='error_goto'> {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
      }
      case  5:
      values[5] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s__nb_iterations);
      if (likely(values[5])) kw_args--;
      else {
        <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("create_fractal", 1, 7, 7, 5);<span class='error_goto'> {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
      }
      case  6:
      values[6] = <span class='py_c_api'>PyDict_GetItem</span>(__pyx_kwds, __pyx_n_s__canvas);
      if (likely(values[6])) kw_args--;
      else {
        <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("create_fractal", 1, 7, 7, 6);<span class='error_goto'> {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args), "create_fractal") < 0))<span class='error_goto'> {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
    }
    __pyx_v_canvas_width = __Pyx_<span class='py_c_api'>PyInt_AsInt</span>(values[0]);<span class='error_goto'> if (unlikely((__pyx_v_canvas_width == (int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
    __pyx_v_canvas_height = __Pyx_<span class='py_c_api'>PyInt_AsInt</span>(values[1]);<span class='error_goto'> if (unlikely((__pyx_v_canvas_height == (int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
    __pyx_v_min_x = __pyx_<span class='py_c_api'>PyFloat_AsDouble</span>(values[2]);<span class='error_goto'> if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
    __pyx_v_min_y = __pyx_<span class='py_c_api'>PyFloat_AsDouble</span>(values[3]);<span class='error_goto'> if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
    __pyx_v_pixel_size = __pyx_<span class='py_c_api'>PyFloat_AsDouble</span>(values[4]);<span class='error_goto'> if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
    __pyx_v_nb_iterations = __Pyx_<span class='py_c_api'>PyInt_AsInt</span>(values[5]);<span class='error_goto'> if (unlikely((__pyx_v_nb_iterations == (int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
    __pyx_v_canvas = values[6];
  } else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 7) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_canvas_width = __Pyx_<span class='py_c_api'>PyInt_AsInt</span>(<span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0));<span class='error_goto'> if (unlikely((__pyx_v_canvas_width == (int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
    __pyx_v_canvas_height = __Pyx_<span class='py_c_api'>PyInt_AsInt</span>(<span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1));<span class='error_goto'> if (unlikely((__pyx_v_canvas_height == (int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
    __pyx_v_min_x = __pyx_<span class='py_c_api'>PyFloat_AsDouble</span>(<span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2));<span class='error_goto'> if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
    __pyx_v_min_y = __pyx_<span class='py_c_api'>PyFloat_AsDouble</span>(<span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3));<span class='error_goto'> if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
    __pyx_v_pixel_size = __pyx_<span class='py_c_api'>PyFloat_AsDouble</span>(<span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 4));<span class='error_goto'> if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
    __pyx_v_nb_iterations = __Pyx_<span class='py_c_api'>PyInt_AsInt</span>(<span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 5));<span class='error_goto'> if (unlikely((__pyx_v_nb_iterations == (int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
    __pyx_v_canvas = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 6);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("create_fractal", 1, 7, 7, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args));<span class='error_goto'> {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}</span>
  __pyx_L3_error:;
  <span class='pyx_c_api'>__Pyx_AddTraceback</span>("mandel2i_cy.create_fractal");
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_canvas);
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line27")'> 27:                        double min_x, double min_y, double pixel_size,</pre>
<pre id='line27' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line28")'> 28:                        int nb_iterations, canvas):</pre>
<pre id='line28' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line29")'> 29:     cdef int x, y, start_y, end_y</pre>
<pre id='line29' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line30")'> 30:     cdef double real, imag</pre>
<pre id='line30' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line31")'> 31:     cdef bint start_line</pre>
<pre id='line31' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line32")'> 32: </pre>
<pre id='line32' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line33")'> 33:     for x in range(0, canvas_width):</pre>
<pre id='line33' class='code' style='background-color: #FFFFff'>
    __pyx_t_1 = __pyx_v_canvas_width;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_x = __pyx_t_2;
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line34")'> 34:         real = min_x + x*pixel_size</pre>
<pre id='line34' class='code' style='background-color: #FFFFff'>
        __pyx_v_real = (__pyx_v_min_x + (__pyx_v_x * __pyx_v_pixel_size));
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line35")'> 35:         start_line = False</pre>
<pre id='line35' class='code' style='background-color: #FFFFff'>
        __pyx_v_start_line = 0;
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line36")'> 36:         for y in range(0, canvas_height):</pre>
<pre id='line36' class='code' style='background-color: #FFFFff'>
        __pyx_t_3 = __pyx_v_canvas_height;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_y = __pyx_t_4;
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line37")'> 37:             imag = min_y + y*pixel_size</pre>
<pre id='line37' class='code' style='background-color: #FFFFff'>
            __pyx_v_imag = (__pyx_v_min_y + (__pyx_v_y * __pyx_v_pixel_size));
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line38")'> 38:             if mandel(real, imag, nb_iterations):</pre>
<pre id='line38' class='code' style='background-color: #FFFFff'>
            __pyx_t_6.__pyx_n = 1;
      __pyx_t_6.max_iterations = __pyx_v_nb_iterations;
      __pyx_t_5 = __pyx_f_11mandel2i_cy_mandel(__pyx_v_real, __pyx_v_imag, &__pyx_t_6); 
      if (__pyx_t_5) {
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line39")'> 39:                 if not start_line:</pre>
<pre id='line39' class='code' style='background-color: #FFFFff'>
                __pyx_t_5 = (!__pyx_v_start_line);
        if (__pyx_t_5) {
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line40")'> 40:                     start_line = True</pre>
<pre id='line40' class='code' style='background-color: #FFFFff'>
                    __pyx_v_start_line = 1;
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line41")'> 41:                     start_y = canvas_height - y</pre>
<pre id='line41' class='code' style='background-color: #FFFFff'>
                    __pyx_v_start_y = (__pyx_v_canvas_height - __pyx_v_y);
          goto __pyx_L11;
        }
        __pyx_L11:;
        goto __pyx_L10;
      }
      /*else*/ {
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line42")'> 42:             else:</pre>
<pre id='line42' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line43")'> 43:                 if start_line:</pre>
<pre id='line43' class='code' style='background-color: #FFFFff'>
                __pyx_t_5 = __pyx_v_start_line;
        if (__pyx_t_5) {
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line44")'> 44:                     start_line = False</pre>
<pre id='line44' class='code' style='background-color: #FFFFff'>
                    __pyx_v_start_line = 0;
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line45")'> 45:                     end_y = canvas_height - y</pre>
<pre id='line45' class='code' style='background-color: #FFFFff'>
                    __pyx_v_end_y = (__pyx_v_canvas_height - __pyx_v_y);
</pre><pre class='line' style='background-color: #FFFF28' onclick='toggleDiv("line46")'> 46:                     canvas.create_line(x, start_y, x, end_y, fill="black")</pre>
<pre id='line46' class='code' style='background-color: #FFFF28'>
                    __pyx_t_7 = <span class='py_c_api'>PyObject_GetAttr</span>(__pyx_v_canvas, __pyx_n_s__create_line);<span class='error_goto'> if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
          <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_7);
          __pyx_t_8 = <span class='py_c_api'>PyInt_FromLong</span>(__pyx_v_x);<span class='error_goto'> if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
          <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_8);
          __pyx_t_9 = <span class='py_c_api'>PyInt_FromLong</span>(__pyx_v_start_y);<span class='error_goto'> if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
          <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_9);
          __pyx_t_10 = <span class='py_c_api'>PyInt_FromLong</span>(__pyx_v_x);<span class='error_goto'> if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
          <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_10);
          __pyx_t_11 = <span class='py_c_api'>PyInt_FromLong</span>(__pyx_v_end_y);<span class='error_goto'> if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
          <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_11);
          __pyx_t_12 = <span class='py_c_api'>PyTuple_New</span>(4);<span class='error_goto'> if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
          <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_12);
          <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_12, 0, __pyx_t_8);
          <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_8);
          <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_12, 1, __pyx_t_9);
          <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_9);
          <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_12, 2, __pyx_t_10);
          <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_10);
          <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_12, 3, __pyx_t_11);
          <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_11);
          __pyx_t_8 = 0;
          __pyx_t_9 = 0;
          __pyx_t_10 = 0;
          __pyx_t_11 = 0;
          __pyx_t_11 = <span class='py_c_api'>PyDict_New</span>();<span class='error_goto'> if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
          <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(((PyObject *)__pyx_t_11));
          if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_11, ((PyObject *)__pyx_n_s__fill), ((PyObject *)__pyx_n_s__black)) < 0)<span class='error_goto'> {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
          __pyx_t_10 = <span class='py_c_api'>PyEval_CallObjectWithKeywords</span>(__pyx_t_7, __pyx_t_12, ((PyObject *)__pyx_t_11));<span class='error_goto'> if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
          <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_10);
          <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
          <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_12); __pyx_t_12 = 0;
          <span class='pyx_macro_api'>__Pyx_DECREF</span>(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
          <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_10); __pyx_t_10 = 0;
          goto __pyx_L12;
        }
        __pyx_L12:;
      }
      __pyx_L10:;
    }
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line47")'> 47:         if start_line:</pre>
<pre id='line47' class='code' style='background-color: #FFFFff'>
        __pyx_t_5 = __pyx_v_start_line;
    if (__pyx_t_5) {
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line48")'> 48:             end_y = canvas_height - y</pre>
<pre id='line48' class='code' style='background-color: #FFFFff'>
            __pyx_v_end_y = (__pyx_v_canvas_height - __pyx_v_y);
</pre><pre class='line' style='background-color: #FFFF21' onclick='toggleDiv("line49")'> 49:             canvas.create_line(x, start_y, x, end_y, fill="black")</pre>
<pre id='line49' class='code' style='background-color: #FFFF21'>
            __pyx_t_10 = <span class='py_c_api'>PyObject_GetAttr</span>(__pyx_v_canvas, __pyx_n_s__create_line);<span class='error_goto'> if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
      <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_10);
      __pyx_t_11 = <span class='py_c_api'>PyInt_FromLong</span>(__pyx_v_x);<span class='error_goto'> if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
      <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_11);
      __pyx_t_12 = <span class='py_c_api'>PyInt_FromLong</span>(__pyx_v_start_y);<span class='error_goto'> if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
      <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_12);
      __pyx_t_7 = <span class='py_c_api'>PyInt_FromLong</span>(__pyx_v_x);<span class='error_goto'> if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
      <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_7);
      __pyx_t_9 = <span class='py_c_api'>PyInt_FromLong</span>(__pyx_v_end_y);<span class='error_goto'> if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
      <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_9);
      __pyx_t_8 = <span class='py_c_api'>PyTuple_New</span>(4);<span class='error_goto'> if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
      <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_8);
      <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_8, 0, __pyx_t_11);
      <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_11);
      <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_8, 1, __pyx_t_12);
      <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_12);
      <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_8, 2, __pyx_t_7);
      <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_7);
      <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_8, 3, __pyx_t_9);
      <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GIVEREF</span></span>(__pyx_t_9);
      __pyx_t_11 = 0;
      __pyx_t_12 = 0;
      __pyx_t_7 = 0;
      __pyx_t_9 = 0;
      __pyx_t_9 = <span class='py_c_api'>PyDict_New</span>();<span class='error_goto'> if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
      <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(((PyObject *)__pyx_t_9));
      if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_9, ((PyObject *)__pyx_n_s__fill), ((PyObject *)__pyx_n_s__black)) < 0)<span class='error_goto'> {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
      __pyx_t_7 = <span class='py_c_api'>PyEval_CallObjectWithKeywords</span>(__pyx_t_10, __pyx_t_8, ((PyObject *)__pyx_t_9));<span class='error_goto'> if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}</span>
      <span class='pyx_macro_api'><span class='refnanny'>__Pyx_GOTREF</span></span>(__pyx_t_7);
      <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_10); __pyx_t_10 = 0;
      <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_8); __pyx_t_8 = 0;
      <span class='pyx_macro_api'>__Pyx_DECREF</span>(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
      <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L13;
    }
    __pyx_L13:;
  }

  __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7);
  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8);
  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9);
  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10);
  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_11);
  <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12);
  <span class='pyx_c_api'>__Pyx_AddTraceback</span>("mandel2i_cy.create_fractal");
  __pyx_r = NULL;
  __pyx_L0:;
  <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_canvas);
  <span class='pyx_macro_api'><span class='refnanny'>__Pyx_XGIVEREF</span></span>(__pyx_r);
  <span class='pyx_c_api'>__Pyx_TraceReturn</span>(__pyx_r);
  <span class='pyx_c_api'><span class='refnanny'>__Pyx_RefNannyFinishContext</span></span>();
  return __pyx_r;
}
</pre></body></html>
